# 1-导包
import requests
# 2-发送请求，获取响应

# 执行获取验证码接口，提取uuid
resp_image = requests.get(url=base_url+"/api/captchaImage")
print(resp_image.json())
uuid = resp_image.json().get("uuid")  # 通过字典取值，提取关联数据uuid

resp = requests.post(url=base_url+"/api/login",
                     json={"username": "admin", "password": "HM_2023_test",
                           "code":"2", "uuid":uuid})
# 3-查看响应结果
print(resp.status_code)
print(resp.json())